package com.huanglj.himalaya.adapters;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import static com.huanglj.himalaya.utils.Constants.PAGE_COUNT;
import com.huanglj.himalaya.utils.FragmentCreator;

/**
 * 主界面显示的适配器
 */
public class MainContentAdapter extends FragmentPagerAdapter {
    public MainContentAdapter(@NonNull FragmentManager fm, int behavior) {
        super(fm, behavior);
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return FragmentCreator.getFragment(position);
    }

    @Override
    public int getCount() {
        return PAGE_COUNT;
    }
}
